package com.mv.dao;

import com.mv.entity.Type;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * @author Administrator
 */
@Repository
public interface TypeMapper extends Mapper<Type> {


    /**
     * 根据电影编号查询类型集合
     * 程龙
     * @param movieId
     * @return
     */
    @Select("SELECT t.id,t.typeName FROM type t INNER JOIN movie_type mt ON t.id = mt.typeId WHERE mt.movieId = #{movieId}")
    List<Type> selectTypeForMovieVo(@Param("movieId")Integer movieId);





}